The present invention relates to a semiconductor device and, in particular, to a semiconductor device which can perform initialization to a first state of two states of the first state and a second state, and which can generate a signal having a potential corresponding to the initialized first state.
In recent years, to protect information property, there has been developed a semiconductor device (an LSI or the like) provided with a micro control unit (MCU) used for security which can read data from a memory only when permitted by authentication. Because this semiconductor device initializes an enable signal that permits reading data from the memory (it performs initialization to “0” of two states of “0” (non-permission for reading data) and “1” (permission for reading data)) by power-on reset (initialization at the time of starting a power supply), the data cannot usually be read from the memory.
Power-on reset is performed in a power-on reset circuit including a power supply voltage detection circuit that detects whether or not a rising voltage when a power supply is started is not less than a reference voltage; and a reset circuit which generates an initialization signal when the power supply voltage detection circuit detects a rising voltage not less than the reference voltage.
However, when the power-on reset circuit operates under a temperature condition or a power supply condition, except for an operation guaranteed range, there has been a case in which the power-on reset circuit cannot generate a normal initialization signal, and cannot initialize the enable signal. When the enable signal cannot be initialized, there has been a case in which the semiconductor device can always read data from the memory. There exists a method for attacking the semiconductor device, which is intentionally operated under the temperature condition or the power supply condition, except for the operation guaranteed range as described above and which attempts unauthorized access to confidential information stored in the memory.
In addition, when the power-on reset circuit cannot generate the normal initialization signal, there has been a possibility that processing of a program stored in the memory goes out of control. Japanese Patent Laid-Open No. 2000-137696 (Patent Document 1) discloses a configuration in which even though a normal initialization signal cannot be generated, and processing of a program stored in a nonvolatile memory goes out of control, erroneous rewrite of the program content can be prevented.
When the power-on reset circuit cannot generate the normal initialization signal, it is necessary to take measures for every failure, such as preventing erroneous rewrite of the program content in the same way as in the nonvolatile memory disclosed in Patent Document 1.
However, when taking measures for every failure, it is necessary for the semiconductor device to include a plurality of configurations which can achieve processing, such as preventing erroneous rewrite of the program content (such as usually making it impossible to read data from the memory), and the configurations become complex. Even though measures are not taken for every failure, and the power-on reset circuit cannot generate the normal initialization signal under the temperature condition or the power supply condition, except for the operation guaranteed range, it is not necessary for the semiconductor device to take measures for every failure if a signal having a potential corresponding to an initialized state can be generated.
Therefore, the present invention has been made to solve the above described problems, and an object of the present invention is to provide a semiconductor device which can perform initialization to a first state of two states of the first state and a second state, and which can generate a signal having a potential corresponding to the initialized first state.